<?php
foreach($this->languages as $language) {
        if ($langCount > 1) {?>
<div class="form-group row lang lang-<?php echo $language['id'];?>"<?php
        if ((int) $language['id'] !== APP_LANG_ID) {?> style="display:none;"<?php }?>>
<div class="col-lg-9">
<?php
        }
        if (isset($input['maxchar'])) {?>
<div class="input-group input-group-alt">
<span id="<?php echo ($input['id'] ?? $input['name']).'_'.$language['id'];?>_counter" class="input-group-prepend">
    <span class="input-group-text"><?php echo $input['maxchar'];?></span>
</span>
<?php
        }
?>
<textarea name="<?php echo $input['name'].'_'.$language['id'];
        ?>" id="<?php echo ($input['id'] ?? $input['name']).'_'.$language['id'];
        ?>" class="form-control <?php echo $input['class'] ?? '';
        ?>" <?php
        if (!empty($input['readonly'])) {?> readonly="readonly"<?php }
        if (isset($input['cols'])) {?> cols="<?php echo $input['cols'];?>"<?php }
        if (isset($input['rows'])) {?> rows="<?php echo $input['rows'];?>"<?php }
        if (isset($input['maxchar'])) {?> maxlength="<?php echo $input['maxchar'];?>"<?php }?>><?php
        echo $this->value[$input['name']][$language['id']] ?? '';?></textarea>
<?php
        if (isset($input['maxchar'])) {
?>
</div>
<?php
        }
        if ($langCount > 1) {?>
</div>
<div class="col-lg-3">
<div class="input-group-prepend dropdown">
  <button class="btn btn-secondary" type="button" data-toggle="dropdown"><?php
            echo $language['iso'];?> <span class="caret"></span></button>
  <div class="dropdown-arrow"></div>
  <div class="dropdown-menu"><?php
            foreach($this->languages as $language) {?>
<a class="dropdown-item" href="javascript:hideOtherLanguage(<?php echo $language['id'];?>);" tabindex="-1"><?php
                echo $language['name'];?></a><?php
            }
?>
  </div>
</div>
</div>
</div>
<?php
        }
    }